<template>
	<view class="body">
		<view class="content">
			<textarea class="textarea_style" value="" v-model="form.mem" placeholder="请输入房源描述..." />
			<view style="display: flex;align-items: flex-start;align-items: center;flex-wrap: wrap;">
				<view style="position: relative;" v-for="(item,index) in imgList" :key="index">
					<image class="upload_img" :src="item" mode=""></image>
					<image class="close_icon" @click="deleteImg(index)" src="../../static/img/close.png" mode=""></image>
				</view>
				<view class="publish" @tap="uploadImg">
					<image class="publish_add" src="../../static/img/add.png" mode=""></image>
				</view>
			</view>
			<!-- <view> -->
				<picker @change="bindPickerChangeType" :value="typeIndex" :range="houseTypeArray" :range-key="'typeName'">
					<view class="select">
						<view class="select_left">
							<view class="select_text">房源类型</view>
						</view>
						<view class="select_left">
							<view class="uni-input">{{houseTypeArray[typeIndex].typeName}}</view>
							<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
						</view>
					</view>
				</picker>
			<!-- </view> -->
			<view class="select">
				<view class="select_left">
					<view class="select_text">电话号码</view>
				</view>
				<view class="select_left">
					<input v-model="form.mobile" type="number" maxlength="11" placeholder="请输入电话号码" style="text-align: right;font-size: 28rpx;" />
					<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
				</view>
			</view>
			<view class="select"  @tap="search">
				<view class="select_left">
					<view class="select_text">位置</view>
				</view>
				<view class="select_left">
					<text class="select_text" style="font-size: 28rpx;" v-if="form.buildingName=='' ">请选择地址</text>
					<text class="select_text" v-else ="form.buildingName!='' ">{{form.buildingName}}</text>
					<image class="to_arrow" src="../../static/img/right.png" mode="form.ddress"></image>
				</view>
			</view>
					<picker @change="bindPickerChange4" :range="countArray" mode="multiSelector">
						<view class="select" v-if="showType == true">
							<view class="select_left">
								<view class="select_text">户型</view>
							</view>
							<view class="select_left">
								<view class="uni-input">{{form.shiCount}}室 - {{form.tingCount}}厅 - {{form.wei}}卫</view>
								<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
							</view>
						</view>
					</picker>
					<picker @change="bindPickerChange2" :value="index3" :range="positionArray" :range-key="'dictLabel'">
						<view class="select">
							<view class="select_left">
								<view class="select_text">朝向</view>
							</view>
							<view class="select_left">
								<view class="uni-input">{{positionArray[index3].dictLabel}}</view>
								<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
							</view>
						</view>
					</picker>
			<view class="select">
				<view class="select_left">
					<view class="select_text">面积</view>
				</view>
				<view class="select_left">
					<input type="number" v-model="form.area" style="text-align: right;font-size: 32rpx;" placeholder="请输入..." value="" /><text style="font-size: 28rpx;color: #8F8D8E;">(㎡)</text>
					<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
				</view>
			</view>
					<picker @change="bindPickerChange5" :value="index5" :range="floorArray" mode="multiSelector">
						<view class="select">
							<view class="select_left">
								<view class="select_text">楼层</view>
							</view>
							<view class="select_left">
								<view class="uni-input">{{form.floor}}层 - 共{{form.floorTotal}}层</view>
								<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
							</view>
						</view>
					</picker>
			<view class="select">
				<view class="select_left">
					<view class="select_text">楼号-门牌号(选填)</view>
				</view>
				<view class="select_left">
					<input type="text" v-model="form.dong" placeholder="请输入楼号-门牌号" style="text-align: right;font-size: 28rpx;" value="" />
					<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
				</view>
			</view>
			<view class="select">
				<view class="select_left">
					<view class="select_text">家具(选填)</view>
				</view>
				<view class="select_left">
					<input type="text" v-model="form.furniture" placeholder="请输入家具" style="text-align: right;font-size: 28rpx;" value="" />
					<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
				</view>
			</view>
				<!-- 租赁方式 -->
					<picker v-if="typeIndex == 0" @change="bindPickerChange" :value="index" :range="array" :range-key="'dictLabel'">
						<view class="select">
							<view class="select_left">
								<view class="select_text">租赁方式</view>
							</view>
							<view class="select_left">
								<view class="uni-input">{{array[index].dictLabel}}</view>
								<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
							</view>
						</view>
					</picker>
			<view class="select">
				<view class="select_left">
					<view class="select_text">租金/月</view>
				</view>
				<view class="select_left">
					<input type="number" v-model="form.unitPrice" placeholder="请输入租金(元)" style="text-align: right;font-size: 28rpx;" value="" />
					<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
				</view>
			</view>
					<picker @change="bindPickerChange1($event,payArray)" :value="index2" :range="payArray" :range-key="'dictLabel'">
						<view class="select" style="margin-bottom: 50rpx;">
							<view class="select_left">
								<view class="select_text">交租方式</view>
							</view>
							<view class="select_left">
								<view class="uni-input">{{payArray[index2].dictLabel}}</view>
								<image class="to_arrow" src="../../static/img/right.png" mode=""></image>
							</view>
						</view>
					</picker>
		</view>
		<view class="line_br"></view>
		<view class="bling">	
			<view class="bling_name">房源亮点</view>
			<view class="bling_tag">
				<view class="bling_tag_inner" v-for="(item,index) in tagList" :class="{selected_color: selectedTag.includes(item.dictLabel)}" :key="index" @tap="selectTag(item.dictLabel)">{{item.dictLabel}}</view>
			</view>
			<view class="bling_select">{{selectedTag.join(",")}}</view>
		</view>
		<view class="submit_btn" @tap="submitHouse">提交</view>
		<!-- 海报 -->
		<view class="posters" v-if="isPoster">
			<view class="posters_layer">
				<view class="canvas-box">
					<canvas class="canvas-inner" canvas-id="mycanvas"/>
				</view>	
				<view class="poster_btn">
					<view @tap="cancelPoster" class="poster_cancel">取消</view>
					<view @tap="saveImg" class="poster_cancel sure_btn1">保存到相册</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script> 
	export default {
		data() {
			return {
				modalName: '',
				array: [],
				index: 0,
				typeIndex: 0,
				houseTypeArray: [],
				payArray: [],
				index2: 0,
				positionArray: [],
				index3: 0,
				address: '',
				form:{
					shiCount:'',
					tingCount: '',
					wei:'',
					floor: '',
					floorTotal: '',
					unitPrice:'',
					address:'',
					area:'',
					dong:''
				},
				imgList: [],
				tagList: [],
				selectedTag: [],
				list: [],
				searchKey: '',
				latitude: '',
				longitude: '',
				info: {},
				whichIndex: '',
				detailId: '',
				tabclick: false,
				isVerify: false,
				countArray: [
					["1室","2室","3室","4室","5室","6室","7室","8室","9室"],
					["1厅","2厅","3厅","4厅","5厅","6厅","7厅","8厅","9厅"],
					["1卫","2卫","3卫","4卫","5卫","6卫","7卫","8卫","9卫"]
				],
				countIndex1: 0,
				countIndex2: 0,
				countIndex3: 0,
				floorArray: [
					["请选择所在楼层",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],
					["请选择共有楼层",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99]
				],
				floorIndex1: 1,
				floorIndex2: 1,
				index4: '',
				index5: '',
				showType: true,
				isPoster: false,
				publishId: ''
			}
		},
		onTabItemTap(e) {
			// tab 点击时执行，此处直接接收单击事件
			this.resetForm()
			if(uni.getStorageSync("token") && uni.getStorageSync("userId") ){
				// this.getStatus()
			}else{
				this.getUserInfo()
			}
		},
		onShow() {
			try {
				const value = uni.getStorageSync('updateId');
				if (value) {
					this.detailId = value;
					uni.removeStorageSync('updateId');
					if(this.detailId){
						this.getSelect("leasing_mode")
						this.getSelect("bright_points")
						this.getSelect("house_orientation")   
						this.getSelect("rent_payment")
						this.getHouseType()
						this.getDetail()
					}
				}else{
					this.getSelect("leasing_mode")
					this.getSelect("bright_points")
					this.getSelect("house_orientation")   
					this.getSelect("rent_payment")
					this.getHouseType()
				}
			} catch(e) {
			}
		},
		methods: {
			cancelPoster(){
				this.isPoster = false
				this.resetForm()
				uni.navigateTo({
					url: '../fangyuan/fangyuan?type=2'
				})
			},
			formSubmit: function(e){
				let that = this
				uni.showLoading({
				    title: '海报生成中...'
				});
				that.isPoster = true
				// 根据发布成功的ID，获取详情
				that.$api.request('/api/web/houseDetail','',{
					id: that.publishId
				}, failres => {
					uni.showToast({
						title: failres.msg,
						icon: "none"
					});
				}).then(res => {
					let detailId = res.data.id
					let unitPrice
					if(res.data.unitPrice == "undefined" || res.data.unitPrice == null || res.data.unitPrice == 0){
						unitPrice = "面谈"
					}else{
						unitPrice = res.data.unitPrice + "元/月"
					}
					// let unitPrice = res.data.unitPrice ? res.data.unitPrice + "元/月" : "面谈"
					let buildingName = res.data.buildingName
					let area = res.data.area + "平米"
					var context = wx.createCanvasContext('mycanvas');
					var path = '../../static/img/poster_bg1.jpg'
					context.drawImage(path,0,0,350,550);
					context.font = "30px bold FangSong";
					context.fillStyle = "#DB4200";
					context.textAlign = "center";
					context.textBaseline = "middle";
					if (buildingName.length > 8){
						context.fillText(buildingName.substring(0,8),180,250)
						context.fillText(buildingName.substring(8,buildingName.length),180,290)
					}else{
						context.fillText(buildingName, 180, 290);
					}
					context.fillText("面积: "+ area, 180, 340);
					context.fillText("价格: "+ unitPrice, 180, 390);
					let submitId = detailId || "00000000"
					uni.request({
						url: "https://zlzfcloud.xyz/api/weixinCode/getCode",
						method: 'POST',
						responseType: 'arraybuffer',
						header: {
							"Content-Type": "application/x-www-form-urlencoded"
					    },
						data: {
							param: submitId,
							page: 'pages/houseDetail/houseDetail'
						},
						success: (res) => {
							console.log(res)
							let src = wx.arrayBufferToBase64(res.data);
							let src2 = 'data:image/png;base64,' + src
							const fs = wx.getFileSystemManager();
							//随机定义路径名称
							var times = new Date().getTime();
							var codeimg = wx.env.USER_DATA_PATH + '/' + times + '.png';
							console.log("codeimg",codeimg)
							fs.writeFile({
								filePath: codeimg,
								data: src2.slice(22),
								encoding: 'base64',
								success: (rrr) => {
								  console.log("rrr",rrr)
								  context.drawImage(codeimg,130,420,100,100);
								  context.draw();
								  uni.hideLoading()
								},
								fail: (err) =>{
									console.log("err",err)
								}
							});
						},
					})
				})
			},
			saveImg(){
				let that = this
				uni.canvasToTempFilePath({
					x: 0,
					y: 0,
					height: 550,
					width: 350,
					canvasId: 'mycanvas',
					success: (response) => {
						uni.saveImageToPhotosAlbum({
							filePath: response.tempFilePath,
							success: (response) => {
							 uni.showModal({
							     title: '提示',
							     content: '图片保存成功！',
							     success: function (res) {
							         if (res.confirm) {
							 			that.isPoster = false
							 			that.resetForm()
							 			uni.navigateTo({
							 				url: '../fangyuan/fangyuan?type=2'
							 			})
							         } else if (res.cancel) {
										that.isPoster = false
							 			that.resetForm()
							 			uni.navigateTo({
							 				url: '../fangyuan/fangyuan?type=2'
							 			})
							         }
							     }
							 });
							},
							fail: (response) => {
							 uni.openSetting({
								success: (response) => {
								}
							 })
							}
						})
					},
					fail: (response) => {
						console.log(response);
					}
				}, this); 
			},
			sureAudit(){
				this.modalName = ''
				uni.switchTab({
					url: '../home/home'
				})
			},
			getUserInfo(){
				let that = this
			   uni.getUserProfile({
				   desc:'Wexin',     // 这个参数是必须的
				   success:res=>{
					   uni.setStorageSync('nickName', res.userInfo.nickName);
					   uni.setStorageSync('avatarUrl', res.userInfo.avatarUrl);
					   uni.login({
					   	provider: 'weixin',
					   	success: (wxres => {
					   		that.$api.request('/api/web/wxlogin','',{
					   			code: wxres.code,
					   		}, failres => {
					   			uni.showToast({
					   				title: failres.msg,
					   				icon: "none"
					   			});
					   		}).then(res1 => {
					   			uni.setStorageSync('token', res1.data.token);
					   			uni.setStorageSync('openid', res1.data.openid);
								uni.setStorageSync('userId', res1.data.user.userId);
								// that.getStatus()
					   		})
					   	})
					   })
				   },
				   fail:err=>{
					   uni.switchTab({
					   	url: "../home/home"
					   })
				   }
			   })
			},
			resetForm(){
				this.form = {
					buildingId: "0",
					areaCode: "0",
					customerName: "0",
					decoration_id: "0",
					id: '',
					shiCount: '',
					tingCount: '',
					floor: '',
					floorTotal:'',
					addUserid: '',
					address: '',
					buildingName: '',
					dong: '',
					wei: '',
					area: '',
					mobile: '',
					unitPrice: '',
					state: 6,
					latitude: '',
					longitude: '',
					img: '',
					mem:'',
					furniture: '',
					highlights: '',
					typeId: '',
					orientation: '',
					deposit: '', 
					addCopId: ''
				}
				this.imgList = []
				this.index3 = 0
				this.index2 = 0
				this.index = 0
				this.typeIndex = 0
				this.selectedTag = []
			},
			//获取详情
			getDetail(){
				let that = this;
				that.$api.request('/api/web/houseDetail','',{
					id: that.detailId
				}, failres => {
					uni.showToast({
						title: failres.msg,
						icon: "none"
					});
				}).then(res => {
					that.form = res.data
					if(that.form.img){
						that.imgList = that.form.img.split(",")
					}else{
						that.imgList = []
					}
					that.selectedTag = []
					if(that.form.typeId == 1){
						that.showType = true
					}else{
						that.showType = false
						that.form.shiCount = ''
						that.form.tingCount = ''
						that.form.wei = ''
					}
					// 亮点
					if(that.form.highlights){
						let shighlights = that.form.highlights.split(",")
						for(let i=0;i<shighlights.length;i++){
							for(let j=0;j<that.tagList.length;j++){
								if(shighlights[i] == that.tagList[j].dictCode){
									that.selectedTag.push(that.tagList[j].dictLabel)
								}
							}
						}
					}
					//朝向
					that.index3 = that.positionArray.findIndex(item =>{
					    return item.dictCode == that.form.orientation
					});
					//交租方式
					that.index2 = that.payArray.findIndex(item =>{
					    return item.dictCode == that.form.deposit
					});
					//租赁方式 
					that.index = that.array.findIndex(item =>{
					    return item.dictCode == that.form.addCopId
					});
					// 房源类型
					that.typeIndex = that.houseTypeArray.findIndex(item =>{
					    return item.id == that.form.typeId
					});
				})
			},
			// 获取房源类型
			getHouseType(){
				let that = this;
				that.$api.request('/api/types/list','',{}, failres => {
					uni.showToast({
						title: failres.msg,
						icon: "none"
					});
				}).then(res => {
					that.houseTypeArray = res.rows
				})
			},				
			//获取选择项
			getSelect(type){
				let that = this;
				that.$api.request('/api/dict/data/list','',{
					dictType: type
				}, failres => {
					uni.showToast({
						title: failres.msg,
						icon: "none"
					});
				}).then(res => {
					if(type == 'bright_points'){
						that.tagList = res.rows
					}else if(type == 'house_orientation'){
						that.positionArray = res.rows
					}else if(type == 'rent_payment'){
						that.payArray = res.rows
					}else if(type == 'leasing_mode'){
						that.array = res.rows
					}
				})
			},
			//地图搜索
			search(e){
				let that = this
				uni.chooseLocation({
				    success: function (res) {
					   that.form.buildingName = res.name
					   that.form.address = res.address
					   that.form.latitude = res.latitude
					   that.form.longitude = res.longitude
				    }
				});
			},
			// 选择亮点
			selectTag(i){
				let that = this
				if(that.selectedTag.includes(i)){
					that.selectedTag = that.selectedTag.filter(function(item) {
						return item != i
					});
				}else{
					that.selectedTag.push(i)
				}
			},
			// 上传图片
			uploadImg(){
				const that = this
				that.$api.uploadImg((res => {
					that.imgList.push(res)
				}))
			},
			//发布
			submitHouse(){
				let that=this
				// 处理亮点
				let highlights = ''
				let newArr = []
				for (let i = 0; i < that.tagList.length; i++) {
					for (let j = 0; j < that.selectedTag.length; j++) {
						if(that.tagList[i].dictLabel === that.selectedTag[j]){
							newArr.push(that.tagList[i].dictCode)
						}
					}
				}
				highlights = newArr.join(",")
				if(!that.form.mem){
					uni.showToast({
						title: "请输入房源描述",
						icon: "none"
					});
					return false
				}
				if(!that.form.mobile){
					uni.showToast({
						title: "请输入手机号码",
						icon: "none"
					});
					return false
				}
				if(!that.form.address || !that.form.buildingName){
					uni.showToast({
						title: "请选择地址",
						icon: "none"
					});
					return false
				}
				if(this.showType == true){
					if(!that.form.shiCount || !that.form.tingCount || !that.form.wei){
						uni.showToast({
							title: "请输入户型",
							icon: "none"
						});
						return false
					}
				}
				if(!that.form.area){
					uni.showToast({
						title: "请输入面积",
						icon: "none"
					});
					return false
				}
				if(!that.form.floor || !that.form.floorTotal){
					uni.showToast({
						title: "请输入楼层",
						icon: "none"
					});
					return false
				}
				// 处理房源类型
				var type = that.houseTypeArray[that.typeIndex].id
				if(that.detailId){ //编辑
					that.$api.request('/api/web/housingUpdate','',{
						id: that.detailId,
						buildingId: "0",
						areaCode: "0",
						customerName: "0",
						shiCount: that.form.shiCount,
						tingCount: that.form.tingCount,
						floor: that.form.floor,
						floorTotal:that.form.floorTotal,
						addUserid:  uni.getStorageSync("userId"),
						address: that.form.address,
						buildingName: that.form.buildingName,
						dong: that.form.dong,
						decoration_id: "0",
						wei: that.form.wei,
						area: that.form.area,
						mobile: that.form.mobile,
						unitPrice:  that.form.unitPrice,
						state: 6,
						latitude: that.form.latitude,
						longitude: that.form.longitude,
						img: that.imgList.join(","),
						mem: that.form.mem,
						furniture: that.form.furniture,
						highlights: highlights,
						typeId: type,
						stick: that.form.stick,
						orientation: that.positionArray[that.index3].dictCode,//朝向
						deposit: that.payArray[that.index2].dictCode, //交租方式
						addCopId: that.array[that.index].dictCode //租赁方式
					}, failres => {
						uni.showToast({
							title: failres.msg,
							icon: "none"
						});
					}).then(res => {
						that.resetForm()
						uni.navigateTo({
							url: '../fangyuan/fangyuan?type=2'
						})
					})
				}else{ //新增
					that.$api.request('/api/web/generate','',{
						buildingId: "0",
						areaCode: "0",
						customerName: "0",
						shiCount: that.form.shiCount,
						tingCount: that.form.tingCount,
						floor: that.form.floor,
						floorTotal:that.form.floorTotal,
						addUserid:  uni.getStorageSync("userId"),
						addCopId: that.array[that.index].dictCode, //租赁方式
						address: that.form.address, //具体地址
						buildingName: that.form.buildingName, //小区名称
						dong: that.form.dong,
						decoration_id: "0",
						wei: that.form.shiCount,
						area: that.form.area,
						mobile: that.form.mobile,
						unitPrice:  that.form.unitPrice,
						state: 6,
						latitude: that.form.latitude,
						longitude: that.form.longitude,
						img: that.imgList.join(","),
						mem: that.form.mem,
						furniture: that.form.furniture,
						highlights: highlights, //亮点
						typeId: type,
						stick: 1,
						orientation: that.positionArray[that.index3].dictCode,//朝向
						deposit: that.payArray[that.index2].dictCode //交租方式
					}, failres => {
						uni.showToast({
							title: failres.msg,
							icon: "none"
						});
					}).then(res => {
						that.publishId = res.msg
						uni.showModal({
						    title: '发布成功！',
						    content: '是否生成海报？',
						    success: function (res) {
						        if (res.confirm) {
						            console.log('用户点击确定');
									that.formSubmit()
						        } else if (res.cancel) {
						            console.log('用户点击取消');
									that.resetForm()
									uni.navigateTo({
										url: '../fangyuan/fangyuan?type=2'
									})
						        }
						    }
						});
						
					})
				}
				
			},
			// 选择小区名称或地址
			open(type){
				this.modalName = type
			},
			hideModal(){
				this.modalName = ""
			},
			//整租合租
			bindPickerChange(e){
				this.index = e.target.value
			},
			//交租方式
			bindPickerChange1(e,array){
				this.index2 = e.target.value
			},
			//朝向
			bindPickerChange2(e){
				this.index3 = e.target.value
			},
			//房源类型
			bindPickerChangeType(e){
				console.log(e)
				this.typeIndex = e.target.value
				console.log(this.typeIndex)
				if(this.typeIndex == 0){
					this.showType = true
				}else {
					this.showType = false
					that.form.shiCount = ''
					that.form.tingCount = ''
					that.form.wei = ''
				}
			},
			// 选择户型
			bindPickerChange4(e){
				console.log(e)
				this.countIndex1 = e.detail.value[0]
				this.countIndex2 = e.detail.value[1]
				this.countIndex3 = e.detail.value[2]
				this.form.shiCount = this.countIndex1 + 1
				this.form.tingCount = this.countIndex2 + 1
				this.form.wei = this.countIndex3 + 1
			},
			// 选择楼层
			bindPickerChange5(e){
				console.log(e)
				this.floorIndex1 = e.detail.value[0]
				this.floorIndex2 = e.detail.value[1]
				this.form.floor = this.floorIndex1
				this.form.floorTotal = this.floorIndex2
			},
			// 删除图片
			deleteImg(index){
				this.imgList.splice(index,1)
			}
		}
	}
</script>

<style lang="scss">
	.posters{
		width: 100vw;
		height: 100%;
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		z-index: 999999;
		.posters_layer{
			background: rgba(0,0,0,0.7);
			width: 100%;
			height: 100%;
			padding-top: 20rpx;
			border-radius: 10rpx;
			.canvas-box{
				width:350px;
				height:550px;
				margin: 0 auto;
				.canvas-inner{
					width:100%;
					height:100%;
					z-index: 9999;
					background: #FFFFFF;
					border-radius: 10rpx;
				}
			}
			.poster_btn{
				width: 350px;
				height: 100rpx;
				margin: 0 auto;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 20rpx;
				.poster_cancel{
					width: 270rpx;
					height: 88rpx;
					background: #FFFFFF;
					color: #0EBFDF;
					text-align: center;
					line-height: 88rpx;
					border-radius: 40rpx;
				}
				.sure_btn1{
					background: #0EBFDF;
					border: none;
					color: #FFFFFF;
				}
			}
		}
	}
	.uni-input{
		font-size: 28rpx;
	}
	.close_img{
		width: 30rpx;
		height: 30rpx;
	}
	.diolag{
		position:fixed;
		background-color:rgba(0,0,0,0.5);
		width:100vw;
		height:100vh;
		top:0;
		left:0;
	}
	.diolag_inner{
		width:90%;
		margin:0 auto;
		position:absolute;
		top:15vh;
		left:2.5%;
		background: #ffffff;
		border-radius: 20rpx;
		max-height: 80vh;
		overflow-y: scroll;
		padding: 20rpx;
	}
	.diolag_title{
		width: 90%;
		margin: 0 auto;
		text-align: center;
		color: #333333;
		padding: 20rpx;
		margin-bottom: 10rpx;
	}
	.select_address{
		border: 1rpx solid #007AFF;
		border-radius: 10rpx;
	}
	.address_input{
		width: 100%;
		height: 50rpx;
		background: #ffffff;
		border-radius: 10rpx;
		line-height: 50rpx;
		margin-bottom: 20rpx;
		border: 1rpx solid #efefef;
	}
	.input_style{
		outline: none;
		border-bottom: 1px solid #ebebeb;
		margin-top: 20rpx;
		text-align: center;
	}
	.sure_btn{
		width: 120rpx;
		height: 60rpx;
		line-height: 60rpx;
		color: #ffffff;
		background: #007AFF;
		text-align: center;
		margin: 50rpx auto 0 auto;
		border-radius: 10rpx;
	}
	.flex{
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.body{
		width: 100%;
		background: #F5F5F5;
		min-height: 100vh;
		.content{
			width: 97%;
			margin: 0 auto;
			.textarea_style{
				width: 100%;
				height: 200rpx;
				font-size: 36rpx;
				line-height: 50rpx;
				padding-top: 10rpx;
				color: #000000;
			}
			.upload_img{
				width: 200rpx;
				height: 200rpx;
				margin-right: 20rpx;
				margin-bottom: 30rpx;
			}
			.close_icon{
				width: 30rpx;
				height: 30rpx;
				position: absolute;
				right: 0;
				top: -15rpx;
			}
			.publish{
				width: 200rpx;
				height: 200rpx;
				background: #EFEFEF;
				position: relative;
				margin-bottom: 30rpx;
				.publish_add{
					width: 100rpx;
					height: 100rpx;
					position: absolute;
					left: 50rpx;
					top: 50rpx;
				}
			}
			.select{
				width: 100%;
				height: 80rpx;
				border-top: 1rpx solid #E6E6E6;
				display: flex;
				align-items: center;
				justify-content: space-between;
				.select_left{
					display: flex;
					align-items: center;
					.select_icon{
						width: 40rpx;
						height: 40rpx;
						margin-right: 20rpx;
					}
				}
				.select_text{
					font-size: 32rpx;
					color: #000000;
					margin-right: 20rpx;
				}
				.to_arrow{
					width: 30rpx;
					height: 30rpx;
				}
			}
			
		}
		.line_br{
			width: 100%;
			height: 20rpx;
			background: #FFFFFF;
		}
		.bling{
			width: 90%;
			margin: 0 auto;
			padding-bottom: 100rpx;
			padding-top: 30rpx;
			.bling_name{
				color: #000000;
				font-size: 32rpx;
			}
			.bling_tag{
				display: flex;
				align-items: center;
				flex-wrap: wrap;
				margin-top: 20rpx;
				.bling_tag_inner{
					background: #E5E5E5;
					color: #828282;
					font-size: 32rpx;
					padding: 5rpx 10rpx;
					margin-right: 30rpx;
					border-radius: 10rpx;
				}
				.selected_color{
					background: #007AFF;
					color: #ffffff;
				}
			}
			.bling_select{
				font-size: 32rpx;
				color: #333333;
				margin-top: 30rpx;
			}
		}
		.submit_btn{
			width: 100%;
			height: 100rpx;
			background: #0091FF;
			color: #FFFFFF;
			line-height: 100rpx;
			text-align: center;
		}
	}
</style>
